Get

Function

This API is used to get parameter for AI > Setup > Stationary Object Detection page.

Request Message

Table 1

ParameterRangeTypeDescription
channel“CH1”…”CH1x”
“IP_CH1”…” IP_CH1x”
“WIFI_CH1”…” WIFI_CH1x”
The number of channels depends on the capabilities of the device.
string arrayEach array bit represents a channel with a string.
DVR/NVR need;
IPC only use CH1
page_type“ChannelConfig”,
“AlarmConfig”
stringThe data used to distinguish whether it is a channel configuration page or an alarm configuration page

Sample:

POST API/AI/Setup/SOD/Get HTTP/1.1
{
    "version": "1.0",
    "data": {"page_type": "ChannelConfig"}
}

Response Message

Parameter Description

Table 2

ParameterRangeTypeDescription
channel_infoJSON objectChannel Information JSON show as follow Table Table 3
page_type“ChannelConfig”,
“AarmConfig”
stringIt is used to distinguish whether it is the data of the channel configuration page or the alarm configuration page, it is only required when setting
channel_maxintMaximum number of channels
support_copyboolWhether the page supports copy(for NVR and DVR only)

Table 3

ParameterRangeTypeDescription
CH1Json ObjectJSON show as follow Table Table 4
Json Object
IP_CH1Json Object
Json Object
WIFI_CH1Json Object
Json Object

Table 4

ParameterRangeTypeDescription
status"Offline",
"Online",
“Nonsupport”
stringChannel online status, only for digital channels.
Note: When the channel is online, there is no such field
alarm_out“Local->1”…
”Local->x”
“IP_CH1->1”…
“IP_CH1->2”…
” IP_CHx->1”
” IP_CHx->2”
The number of channels depends on the capabilities of the device.
arrayAlarm output channel
Each array bit represents aalarm output channel with a string.
Camera:Local->1: open, empty value: close
latch_time"10","20","40","60"stringAlarm output time
record_enabletrue, falseboolRecord channel switch
record_channel“CH1”…”CH1x”
“IP_CH1”…”
IP_CH1x”
“WIFI_CH1”…”
arrayAlarm output channel
Channel alarm linkage switch.
post_recording"30","60","120","300"stringVideo delay time
send_emailtrue, falseboolSend Email switch
ftp_picture_uploadtrue, falseboolChannel capture FTP upload switch (NVR dedicated)
ftp_video_uploadtrue, falseboolChannel video FTP upload switch (NVR dedicated)
picture_to_cloudtrue, falseboolPicture upload switch (NVR dedicated)
video_to_cloudtrue, falseboolVideo cloud upload switch (NVR dedicated)
full_screenboolFullScreen switch(NVR dedicated)
buzzer"0","10","20","40","60"stringBuzzer sounding time (NVR dedicated)
show_messageboolShow Message switch(NVR dedicated)
switchtrue, falseboolswitch,false: close,true: open
sensitivity1-4、0-100intDetection sensitivity
snap_mode"Default"
"RealTimeMode"
"IntervalMode"
stringScreenshot mode,IntervalMode JSON show as follow TableTable 5
min_pixel64-1080intMinimum pixel value
max_pixel320-1080intMaximum pixel value
detection_type"Pedestrian"
"Vehicle"
"Pedestrian &Vehicle"
stringDetection type, human shape and vehicle shape
detection_mode"StaticMode"
"MotionMode"
stringDetection mode
detection_range"FullScreen"
"Customize"
stringExamination range
rule_infoJSON arraySingle Channel Information JSON show as follow Table Table 5
iva_lines0:does not draw a line
1:draws a line
intWhether there will be a line in the preview and playback
copy_ch"digit""analog""wifi"stringFlags to support channel duplication(for NVR and DVR only)
schedule_enableboolSchedule mode
ptz_operation_supportbool(Ball machine use)Supports the ptz operation
sceneIndoor
Outdoor
stringscene
light_linkageboolWhite light linkage alarm
enforcerlight_linkageboolRed and blue indicator linkage alarm
siren_linkageboolAlarm sound linkage alarm
http_listeningboolhttp event push
scheduleObjectThe schedule is displayed as followsTable 8

Table 5

ParameterRangeTypeDescription
rule_number1ObjectRule number 1,Information JSON show as follow Table Table 6
rule_number2ObjectRule number 2,Information JSON show as follow Table Table 6
rule_number3ObjectRule number 3,Information JSON show as follow Table Table 6
rule_number4ObjectRule number 4,Information JSON show as follow Table Table 6

Table 6

ParameterRangeTypeDescription
rule_rectObjectEach channel has a maximum of 64 point coordinates, that is, 32 lines. If it is an accompanying line, only the first line is used. If it is a perimeter, these 8 lines are connected in turn to form a closed figure.
Information JSON show as follow Table Table 7
rule_switchboolRule switch
rule_type“Legacy”
“Lost”
“Lost&Legacy”
stringRule type

Table 7

ParameterRangeTypeDescription
x10-704shortx1 coordinate points
y10-576shorty1 coordinate points
x20-704shortx2 coordinate points
y20-576shorty2 coordinate points
x30-704shortx3 coordinate points
y30-576shorty3 coordinate points
x40-704shortx4 coordinate points
y40-576shorty4 coordinate points

Table 8

ParameterRangeTypeDescription
schedule_type"SendEmail"
"FtpPicUpload"
"CloudPicUpload"
"Record"
"AlarmOut"
"FtpVdUpload"
"CloudVdUpload"
"FloodLight"
"Siren"
"EnforcerLight"
stringSchedule type
weekObejctWeekly information such as Table 9

Table 9

ParameterRangeTypeDescription
day"Sun"
"Mon"
"Tue"
"Wed"
"Thu"
"Fri"
"Sat"
stringday
timeinttime

Sample:

HTTP/1.1 200 OK
Content-Type: application/json
{
    "result": "success",
    "data": {"channel_info": {"CH1": {
        "status": "Online",
        "switch": false,
        "sensitivity": 3,
        "rule_info": {
            "rule_number1": {
                "rule_switch": false,
                "rule_type": "Legacy",
                "rule_rect": {
                    "x1": 231,
                    "y1": 176,
                    "x2": 182,
                    "y2": 501,
                    "x3": 423,
                    "y3": 460,
                    "x4": 419,
                    "y4": 207
                }
            },
            "rule_number2": {
                "rule_switch": false,
                "rule_type": "Legacy",
                "rule_rect": {
                    "x1": 0,
                    "y1": 0,
                    "x2": 0,
                    "y2": 0,
                    "x3": 0,
                    "y3": 0,
                    "x4": 0,
                    "y4": 0
                }
            },
            "rule_number3": {
                "rule_switch": false,
                "rule_type": "Legacy",
                "rule_rect": {
                    "x1": 0,
                    "y1": 0,
                    "x2": 0,
                    "y2": 0,
                    "x3": 0,
                    "y3": 0,
                    "x4": 0,
                    "y4": 0
                }
            },
            "rule_number4": {
                "rule_switch": false,
                "rule_type": "Legacy",
                "rule_rect": {
                    "x1": 0,
                    "y1": 0,
                    "x2": 0,
                    "y2": 0,
                    "x3": 0,
                    "y3": 0,
                    "x4": 0,
                    "y4": 0
                }
            }
        }
    }}}
}

Error Code

See Response Messages Body and Common error_code for more information.